import {request} from '@/plugins/axios'
<#if formBean.springCloud>
import ApiPath from '@/api/${formBean.platformName}/${formBean.artifactId}'
<#else >
import ApiPath from '@/api/${formBean.artifactId}'
</#if>

export function list(query) {
    return request({
        url: ApiPath.${table.entityPath},
        method: 'get',
        params: query
    })
}

export function add(data) {
    return request({
        url: ApiPath.${table.entityPath},
        method: 'post',
        data
    })
}

export function del(id) {
    return request({
        url: ApiPath.${table.entityPath} + '/' + id,
        method: 'delete'
    })
}

export function update(data) {
    return request({
        url: ApiPath.${table.entityPath},
        method: 'put',
        data
    })
}

export function get(id) {
    return request({
        url: ApiPath.${table.entityPath} + '/' + id,
        method: 'get'
    })
}
